//
// Created by BaiXin on 2025/8/20.
//
# include "iostream"
# include "windows.h"

using namespace std;

int main() {
    SetConsoleOutputCP(CP_UTF8);

    //int num = 10;
    //int *p = &num;
    //cout << p << endl;
    //cout << *p << endl;

    //动态
    //int *pInt = new int;
    //*pInt = 20;
    //cout << *pInt << endl;
    //delete pInt;

    string *pString = new string[3];
    pString[0] = "sd";
    pString[1] = "s22d";
    pString[2] = "ddddddd";
    for (int i = 0; i < 3; i++) {
        cout << pString[i] << endl;
    }
    delete[] pString;

    long *l1;
    cout << "--------------" << endl;

    //指向指针的指针
    int i = 1024;
    int *p1 = &i;
    int **pp1 = &p1;
    cout << "i = " << i << endl;
    cout << "p1 = " << p1 << endl;
    cout << "pp1 = " << pp1 << endl;
    cout << "*p1 = " << *p1 << endl;
    cout << "*pp1 = " << *pp1 << endl;
    cout << "**pp1 = " << **pp1 << endl;

    return 0;
}
